<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>盒模型</title>
  <style>
    .box-father {
      width: 85px;
      border: 1px solid #000;
    }

    /* .block-box {
    块级盒模型 设置宽高有效 
      width: 100px;
      height: 100px;
      background-color: red;
      border: 1px solid #000;
      display: block;
      margin: 3px 0;
    } */
    .block-box {
      /* 不设置宽高默认100% */
      height: 100px;
      background-color: red;
      border: 1px solid #000;
      display: block;
      margin: 3px 0;
    }

    .inline-box {
      /* 内联盒子设置宽高无效 */
      width: 100px;
      height: 100px;
      background-color: burlywood;
      display: inline;
    }
  </style>
</head>

<body>

  <div class="box-father">
    <!-- 块级盒子会换行 -->
    <!-- <div class="block-box"></div> -->
    <!-- <div class="block-box"></div> -->
    <div class="inline-box" style="margin:10px;padding: 15px;">测试</div>
    <div class="inline-box" style="margin:10px;">测试</div>

    <!-- <div class="block-box"></div> -->
  </div>
</body>

</html>